<script type="text/javascript" src="slideNotice/js/jquery-1.8.2.js" ></script>
<script type="text/javascript" src="slideNotice/js/jquery-ui-1.9.0.custom.min.js" ></script>
<script type="text/javascript" src="slideNotice/js/jquery-ui-tabs-rotate.js" ></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#featured").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
});
</script>

<?php
	$sql_slidefoto = mysql_query("SELECT id,titulo,foto_principal,descricao_foto FROM tbl_noticias ORDER BY id DESC LIMIT 4");
	$rows = mysql_num_rows($sql_slidefoto);
	if ($rows > 0){
?>
		<div id="featured" >
		  <ul class="ui-tabs-nav">
          <?php
		  	$cont = 1;
			$array_noticia = "";
		  	while(list($id,$titulo,$arquivo,$legenda)=mysql_fetch_array($sql_slidefoto)){
				$array_noticia[] = $id."|".$titulo."|".$arquivo."|".$legenda;
		  ?>
	        <li class="ui-tabs-nav-item" id="nav-fragment-<?php echo $cont; ?>">
            <a href="#fragment-<?php echo $cont; ?>"><img src="noticias/thumb/<?php echo $arquivo; ?> " alt="" />
            <span><?php echo $titulo;  ?></span></a>
            </li>
            <?php
				$cont++;
			 } ?>
	      </ul>
	    <!-- First Content -->
        <?php 
		$cont2 = 1;
		for($i = 0; $i <= $cont;$i++){
			$new = explode("|",$array_noticia[$i]); 
		?>
	    <div id="fragment-<?php echo $cont2; ?>" class="ui-tabs-panel" style="">
			<img src="noticias/fotos/<?php echo $new[2]; ?>" alt="" />
			 <div class="info" >
				<h2><font face="Tahoma, Geneva, sans-serif;" size="+0.5" ><a href="index.php?pagina=slideNotice/noticias_page.php&noticia=<?php echo base64_encode($new[0]); ?>" ><?php echo $new[1];  ?></a></font></h2>
				<p><font face="Tahoma, Geneva, sans-serif;" ><?php echo $new[3] ?>&nbsp;<a href="index.php?pagina=slideNotice/noticias_page.php&noticia=<?php echo base64_encode($new[0]); ?>" >Leia mais</a></font></p>
			 </div>
	    </div>
        <?php
		$cont2++;
		 } ?>
		</div>
<?php }else{  }
?>
<?php 
include('noticias.php');

?>

